<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Article/index')}">文章列表</a></li>
			<li><a href="{:U('Article/add')}">添加文章</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Article/index')}">
			文章标题:
			<input type="text" name="article_title" style="width: 130px;" value="{:I('request.article_title/s','')}" placeholder="请输入文章标题">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Article/index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>文章标题</th>
					<th>文章分类</th>
					<th width="50">{:L('STATUS')}</th>
					<th width="100">{:L('ACTIONS')}</th>
				</tr>
			</thead>
			<style>td{word-break:break-all;}</style>
			<tbody>
				<php>
					$article_statuses=array("0"=>"禁用","1"=>"启用");
					$article_type=array("member_discount"=>"会员优惠");
				</php>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.article_title}</td>
					<td>{$article_type[$vo['article_type']]}</td>
					<td>{$article_statuses[$vo['use_flg']]}</td>
					<td>
						<a href='{:U("Article/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
						<a style="display: none" class="js-ajax-delete" href="{:U('Article/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>